<template>
  <div class="home">
    <div class="home_shang_hei">
      <span>请先登录</span>
      <span>免费注册</span>
      <span>我的订单</span>
      <span>会员中心</span>
      <span>帮助中心</span>
      <span>关于我们</span>
      <span>手机版</span>
    </div>
    <div class="home_shang_biao">
      <div class="home_shang_biao_xin">
        <img src="@/assets/img/logo.0940ebb5.png" alt="">
        <ul class="home_shang_ul">
          <li class="home_ul_yin">首页</li>
          <li v-for="(item, index) in catelist" :key="index" class="home_ul_yin"><span class="flagg"></span>{{ item.name
          }}
            <!-- 隐藏层 -->
            <div class="shang_biao_tian">
              <ul>
                <li v-for="it in item.children" :key="it.id">
                  <img :src="it.picture" alt="">
                  <p>{{ it.name }}</p>
                </li>
              </ul>
            </div>
          </li>

        </ul>
        <div class="biao_xin_zuo">
          <input type="text" placeholder="搜一搜">
        </div>
        <div class="biao_xin_you">

        </div>
        <!-- {{$store.state.classify.cate}} -->
      </div>
      <!-- <ImageMin></ImageMin> -->
    </div>
    <div class="xin">

    </div>

  </div>
</template>

<script>
// import ImageMin from "@/components/mellod/ImageMin"
export default {
  // components:{ImageMin},
  data() {
    return {
      // obj: [
      //   { id: 2, tit: '居家' },
      //   { id: 3, tit: '美食' },
      //   { id: 4, tit: '服饰' },
      //   { id: 5, tit: '母婴' },
      //   { id: 6, tit: '个护' },
      //   { id: 7, tit: '严选' },
      //   { id: 8, tit: '数码' },
      //   { id: 9, tit: '运动' },
      //   { id: 10, tit: '杂项' },
      // ],
      shu: ''
    }
  },
  mounted() {
    this.$store.dispatch("classify/asyncSetCate")
  },
  computed: {
    catelist() {
      return this.$store.state.classify.cate
    }
  }
}
</script>
<style lang="scss">
@import "../assets/mixin";

// span{
//   @include hoverShadow
// }
.home {
  width: 100%;
  height: 100%;

  .home_shang_hei {
    width: 100%;
    height: 53px;
    display: flex;
    align-items: center;
    background: #333333;
    display: flex;
    justify-content: flex-end;
    padding-right: 230px;

    span {
      color: #cdcdcd;
      padding: 0 15px;
      font-size: 14px;
      height: 14px;
      display: inline-block;
      // background: red;
      border-right: 2px solid #666666;
      line-height: 14px;
    }

    span:last-child {
      border: none;
    }

    span:hover {
      color: #27ba9b;
    }
  }

  .home_shang_biao {
    width: 100%;
    height: 132px;
    // position: relative;
    // background: blueviolet;

    .home_shang_biao_xin {
      width: 1200px;
      height: 100%;
      // background: goldenrod;
      margin: auto;
      display: flex;
      justify-content: space-around;
      align-items: center;

      img {
        width: 200px;
        height: 90px;
      }

      .home_shang_ul {
        width: 820px;
        height: 100%;
        padding-left: 40px;
        display: flex;
        justify-content: space-around;

        .home_ul_yin {
          margin-right: 40px;
          // position: relative;
          margin-top: 50px;
          font-size: 16px;
          line-height: 32px;
          height: 132px;
          width: 32px;
          

          .shang_biao_tian {
            position: absolute;
            top: 165px;
            left: 50%;
            // transform: translate(0,-600px);
            width: 1200px;
            height: 130px;
            box-shadow: 1px 1px 5px #666666;
            transform: translate(-600px, 0);
            display: none;

            ul {
              width: 40%;
              height: 100%;
              display: flex;
              align-items: center;

              li {
                flex: 1;
                padding-left: 15px;
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                align-content: space-around;

                img {
                  width: 80px;
                  height: 80px;
                }

                p {
                  font-size: 14px;
                }
              }
            }
          }
        }

        .home_ul_yin:hover .shang_biao_tian {
          display: block;
          // transition: all .5s 5s;
        }

        .home_ul_yin:hover {
          color: #27ba9b;
          // border-bottom: 1px solid #27ba9b;
        }
        .home_ul_yin:hover .flagg {
            width: 32px;
            height: 32px;
            position: absolute;
            border-bottom: 1px solid #27ba9b;
          }

      }

      .biao_xin_zuo {
        width: 170px;
        height: 100%;
        display: flex;
        align-items: center;

        input {
          width: 100%;
          height: 32px;
          // background: #999;
          border: none;
          background-image: url(@/assets/img/Snipaste_2022-12-07_20-25-44.png);
          outline: none;
          background-size: 20px 20px;
          background-repeat: no-repeat;
          background-position: 6px;
          border-bottom: 1px solid #e7e7e7;
          padding-left: 27px;
        }
      }

      .biao_xin_you {
        width: 50px;
        height: 32px;
        background: yellow;
      }
    }

  }


}

.xin {
  width: 1200px;
  height: 100%;
  margin: auto;
  // background: red;

}
</style>
